using GameFramework;
using GameFramework.ObjectPool;
using UnityEngine;

namespace StarForce
{
    
    /// <summary>
    /// 文字飘血对象
    /// </summary>
    public class HpTextItemObject : ObjectBase
    {
        
        public static HpTextItemObject Create(object target)
        {
            HpTextItemObject hpTextItemObject = ReferencePool.Acquire<HpTextItemObject>();
            hpTextItemObject.Initialize(target);
            return hpTextItemObject;
        }
        
        protected override void Release(bool isShutdown)
        {
            HPTextItem hpTextItem = (HPTextItem)Target;
            if (hpTextItem == null)
            {
                return;
            }

            Object.Destroy(hpTextItem.gameObject);
        }
    }
}